package HibernateOrderManagerment.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Table(name="recepition")
@Entity
public class Reception {
	     @Id
	     @Column(name="id")
         private  long id;
//	     @Column(name="reception_status_id")
//         private  long receptionStatusId;
//         @Column(name="orders_id")
//         private  long ordersId;
	     @ManyToOne
	     @JoinColumn(name="reception_status_id")
         private ReceptionStatus receptionStatus;
	     @ManyToOne
	     @JoinColumn(name="orders_id")
	     private Orders orders;
         
         public Reception(){
        	 id=-1;
         }


		public long getId() {
			return id;
		}
		


		public ReceptionStatus getReceptionStatus() {
			return receptionStatus;
		}


		public void setReceptionStatus(ReceptionStatus receptionStatus) {
			this.receptionStatus = receptionStatus;
		}


		public Orders getOrders() {
			return orders;
		}


		public void setOrders(Orders orders) {
			this.orders = orders;
		}


		public void setId(long id) {
			this.id = id;
		}


		@Override
		public String toString() {
			return "Reception [id=" + id + ", receptionStatusId=" + receptionStatus.getId() + ", ordersId=" + orders.getId() + "]";
		}





        
}
